package cn.elricyu.tt.bean;

public class OperationResult<T> {

	private ResultStatus status = ResultStatus.SUCCESS;

	private String message;

	private T relatedObject;

	public ResultStatus getStatus() {
		return status;
	}

	public boolean isSuccess() {
		if (status == ResultStatus.SUCCESS) {
			return true;
		}
		return false;
	}

	public void setStatus(ResultStatus status) {
		this.status = status;
	}

	public String getMessage() {
		return message;
	}

	public void setMessage(String message) {
		this.message = message;
	}

	public T getRelatedObject() {
		return relatedObject;
	}

	public void setRelatedObject(T relatedObject) {
		this.relatedObject = relatedObject;
	}

}
